package com.demo2.todo.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import com.demo2.todo.model.entity.SensitiveWord;
import java.util.Optional;

/**
 * @author evi
 */
public interface SensitiveWordRepository extends JpaRepository<SensitiveWord, Long> {


    /**
     * 根据敏感词内容查询
     */
    Optional<SensitiveWord> findByWord(String word);

    /**
     * 检查敏感词是否已存在
     */
    boolean existsByWord(String word);
}
